import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:convert';

part 'expose_list_response.freezed.dart';
part 'expose_list_response.g.dart';

@freezed
class ExposeListResponse with _$ExposeListResponse {
  const factory ExposeListResponse({
    @JsonKey(name: "c") required int c,
    @JsonKey(name: "m") required String m,
    @JsonKey(name: "d") required List<D> d,
  }) = _ExposeListResponse;

  factory ExposeListResponse.fromJson(Map<String, dynamic> json) =>
      _$ExposeListResponseFromJson(json);
}

@freezed
class D with _$D {
  const factory D({
    @JsonKey(name: "id") required String id,
    @JsonKey(name: "uid") required String uid,
    @JsonKey(name: "nick_name") required String nickName,
    @JsonKey(name: "type") required String? type,
    @JsonKey(name: "content") required String content,
    @JsonKey(name: "images") required List<dynamic> images,
    @JsonKey(name: "videos") required List<dynamic> videos,
    @JsonKey(name: "time") required String time,
    @JsonKey(name: "is_reply") required bool isReply,
  }) = _D;

  factory D.fromJson(Map<String, dynamic> json) => _$DFromJson(json);
}
